import request from '@/utils/request'

export function getClassByPage(data = { pageNum: 1, pageSize: 100 }) {
  return request({
    url: '/info/class_search',
    method: 'post',
    data,
  })
}

export function getClassById(id) {
  return request({
    url: '/info/class_find',
    method: 'get',
    params: {
      id,
    },
  })
}

export function createClass(data) {
  return request({
    url: '/info/class_save',
    method: 'post',
    data,
  })
}

export function updateClass(data) {
  return request({
    url: '/info/class_edit',
    method: 'post',
    data,
  })
}

export function deleteClass(id) {
  return request({
    url: '/info/class_del',
    method: 'get',
    params: {
      id,
    },
  })
}

export function deleteClassByIds(ids) {
  return request({
    url: '/info/class_delbyids',
    method: 'get',
    params: {
      ids,
    },
  })
}
